load("//src/workerd/server/tests/python:import_tests.bzl", "gen_import_tests", "gen_rust_import_tests")
load("//src/workerd/server/tests/python:py_wd_test.bzl", "py_wd_test", "python_test_setup")

python_test_setup()

py_wd_test("hello")

py_wd_test("env-param")

py_wd_test("asgi")

py_wd_test("asgi-sse")

py_wd_test("random")

py_wd_test("subdirectory")

py_wd_test("sdk")

py_wd_test("seek-metadatafs")

gen_import_tests(
    pkg_skip_versions = {
        "0.28.2": [
            "micropip",  # missing lockfile
            "soupsieve",  # Circular dependency with beautifulsoup4
        ],
    },
)

gen_rust_import_tests()

py_wd_test("undefined-handler")

py_wd_test("vendor_dir")

py_wd_test("dont-snapshot-pyodide")

py_wd_test("filter-non-py-files")

py_wd_test("durable-object")

py_wd_test(
    "durable-object-websocket",
    make_snapshot = False,
    # TODO: enabling this will reproduce a strange issue, see comment in EW-9767.
    use_snapshot = None,
)

py_wd_test("worker-entrypoint")

py_wd_test(
    "jspi",
    skip_python_flags = ["0.26.0a2"],
)

py_wd_test("js-import")

py_wd_test(
    "importable-env",
    # TODO: why doesn't dedicated snapshot work with this?
    use_snapshot = None,
)

py_wd_test("python-rpc")

py_wd_test("workflow-entrypoint")

py_wd_test("vendor_dir_compat_flag")

py_wd_test("multiprocessing")

py_wd_test("default-class-with-legacy-global-handlers")

py_wd_test(
    "fastapi",
    make_snapshot = False,
    use_snapshot = "fastapi",
)

py_wd_test(
    "numpy",
    make_snapshot = False,
    use_snapshot = "numpy",
)
